/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     struct ListNode *next;
 * };
 */

//队列实现
bool isPalindrome(struct ListNode* head){
    int cur[1000001]={0};
    int cur_num=0;
    while(head!=NULL)
    {
        cur[cur_num]=head->val;
        cur_num++;
        head=head->next;
    }
    for(int i=0,j=cur_num-1;i<j;i++,j--)
    {
        if(cur[i]!=cur[j])
        {
            return false;
        }
    }
    return true;
}















